home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / GameCreators / TADS / manuals / TEX / ADV_DOC.TEX next >
Encoding:
Text File  |  1992-11-13  |  29.2 KB  |  634 lines

  1. \minorsection itemcnt\par
  2. {\tt itemcnt: function({\it  list })}:
  3. Returns a count of the ``listable'' objects in {\it list}.  An
  4. object is listable (that is, it shows up in a room's description)
  5. if its {\tt isListed} property is {\tt true}.  This function is
  6. useful for determining how many objects (if any) will be listed
  7. in a room's description.
  8.  
  9.  
  10. \minorsection listcont\par
  11. {\tt listcont: function({\it  obj })}:
  12. This function displays the contents of an object, separated by
  13. commas.  The {\tt thedesc} properties of the contents are used.
  14. It is up to the caller to provide the introduction to the list
  15. (usually something to the effect of ``The box contains'' is
  16. displayed before calling {\tt listcont}) and finishing the
  17. sentence (usually by displaying a period).  An object is listed
  18. only if its {\tt isListed} property is {\tt true}.
  19.  
  20.  
  21. \minorsection listfixedcontcont\par
  22. {\tt listfixedcontcont: function({\it  obj })}:
  23. List the contents of the contents of any {\tt fixeditem} objects
  24. in the {\tt contents} list of the object {\it obj}.  This routine
  25. makes sure that all objects that can be taken are listed somewhere
  26. in a room's description.  This routine recurses down the contents
  27. tree, following each branch until either something has been listed
  28. or the branch ends without anything being listable.  This routine
  29. displays a complete sentence, so no introductory or closing text
  30. is needed.
  31.  
  32.  
  33. \minorsection listcontcont\par
  34. {\tt listcontcont: function({\it  obj })}:
  35. This function lists the contents of the contents of an object.
  36. It displays full sentences, so no introductory or closing text
  37. is required.  Any item in the {\tt contents} list of the object
  38. {\it obj} whose {\tt contentsVisible} property is {\tt true} has
  39. its contents listed.  An Object whose {\tt isqcontainer} or
  40. {\tt isqsurface} property is {\tt true} will not have its
  41. contents listed.
  42.  
  43.  
  44. \minorsection turncount\par
  45. {\tt turncount: function({\it  parm })}:
  46. This function can be used as a daemon (normally set up in the {\tt init}
  47. function) to update the turn counter after each turn.  This routine
  48. increments {\tt global.turnsofar}, and then calls {\tt setscore} to
  49. update the status line with the new turn count.
  50.  
  51.  
  52. \minorsection addweight\par
  53. {\tt addweight: function({\it  list })}:
  54. Adds the weights of the objects in {\it list} and returns the sum.
  55. The weight of an object is given by its {\tt weight} property.  This
  56. routine includes the weights of all of the contents of each object,
  57. and the weights of their contents, and so forth.
  58.  
  59.  
  60. \minorsection addbulk\par
  61. {\tt addbulk: function({\it  list })}:
  62. This function returns the sum of the bulks (given by the {\tt bulk}
  63. property) of each object in {\it list}.  The value returned includes
  64. only the bulk of each object in the list, and {\it not} of the contents
  65. of the objects, as it is assumed that an object does not change in
  66. size when something is put inside it.  You can easily change this
  67. assumption for special objects (such as a bag that stretches as
  68. things are put inside) by writing an appropriate {\tt bulk} method
  69. for that object.
  70.  
  71.  
  72. \minorsection incscore\par
  73. {\tt incscore: function({\it  amount })}:
  74. Adds {\it amount} to the total score, and updates the status line
  75. to reflect the new score.  The total score is kept in {\tt global.score}.
  76. Always use this routine rather than changing {\tt global.score}
  77. directly, since this routine ensures that the status line is
  78. updated with the new value.
  79.  
  80.  
  81. \minorsection initSearch\par
  82. {\tt initSearch:  function}.
  83. Initializes the containers of objects with a {\tt searchLoc}, {\tt underLoc},
  84. and {\tt behindLoc} by setting up {\tt searchCont}, {\tt underCont}, and
  85. {\tt behindCont} lists, respectively.  You should call this function once in
  86. your {\tt preinit} (or {\tt init}, if you prefer) function to ensure that
  87. the underable, behindable, and searchable objects are set up correctly.
  88.  
  89.  
  90. \minorsection nestedroom\par
  91. {\tt nestedroom:  room}.
  92. A special kind of room that is inside another room; chairs and
  93. some types of vehicles, such as inflatable rafts, fall into this
  94. category.  Note that a room can be within another room without
  95. being a {\tt nestedroom}, simply by setting its {\tt location} property
  96. to another room.  The {\tt nestedroom} is different from an ordinary
  97. room, though, in that it's an ``open'' room; that is, when inside it,
  98. the actor is still really inside the enclosing room for purposes of
  99. descriptions.  Hence, the player sees ``Laboratory, in the chair."
  100. In addition, a {\tt nestedroom} is an object in its own right,
  101. visible to the player; for example, a chair is an object in a
  102. room in addition to being a room itself.
  103.  
  104.  
  105. \minorsection chairitem\par
  106. {\tt chairitem:  fixeditem, nestedroom, surface}.
  107. Acts like a chair:  actors can sit on the object.  While sitting
  108. on the object, an actor can't go anywhere until standing up, and
  109. can only reach objects that are on the chair and in the chair's
  110. {\tt reachable} list.  By default, nothing is in the {\tt reachable}
  111. list.  Note that there is no real distinction made between chairs
  112. and beds, so you can sit or lie on either; the only difference is
  113. the message displayed describing the situation.
  114.  
  115.  
  116. \minorsection beditem\par
  117. {\tt beditem:  chairitem}.
  118. This object is the same as a {\tt chairitem}, except that the player
  119. is described as lying on, rather than sitting in, the object.
  120.  
  121.  
  122. \minorsection thing\par
  123. {\tt thing:  object}.
  124. The basic class for objects in a game.  The property {\tt contents}
  125. is a list that specifies what is in the object; this property is
  126. automatically set up by the system after the game is compiled to
  127. contain a list of all objects that have this object as their
  128. {\tt location} property.  The {\tt contents} property is kept
  129. consistent with the {\tt location} properties of referenced objects
  130. by the {\tt moveInto} method; always use {\tt moveInto} rather than
  131. directly setting a {\tt location} property for this reason.  The
  132. {\tt adesc} method displays the name of the object with an indefinite
  133. article; the default is to display ``a'' followed by the {\tt sdesc},
  134. but objects that need a different indefinite article (such as ``an''
  135. or ``some'') should override this method.  Likewise, {\tt thedesc}
  136. displays the name with a definite article; by default, {\tt thedesc}
  137. displays ``the'' followed by the object's {\tt sdesc}.  The {\tt sdesc}
  138. simply displays the object's name (``short description'') without
  139. any articles.  The {\tt ldesc} is the long description, normally
  140. displayed when the object is examined by the player; by default,
  141. the {\tt ldesc} displays ``It looks like an ordinary {\tt sdesc}.''
  142. The {\tt isIn({\it object})} method returns {\tt true} if the
  143. object's location is the specified {\it object} or the object's
  144. {\tt location} is an object whose {\tt contentsVisible} property is
  145. {\tt true} and that object's {\tt isIn({\it object})} method is
  146. {\tt true}.  Note that if {\tt isIn} is {\tt true}, it doesn't
  147. necessarily mean the object is reachable, because {\tt isIn} is
  148. {\tt true} if the object is merely visible within the location.
  149. The {\tt thrudesc} method displays a message for when the
  150. player looks through the object (objects such as windows would
  151. use this property).  The {\tt moveInto({\it object})} method
  152. moves the object to be inside the specified {\it object}.
  153. To make an object disappear, move it into {\tt nil}.
  154.  
  155.  
  156. \minorsection item\par
  157. {\tt item:  thing}.
  158. A basic item which can be picked up by the player.  It has no weight
  159. (0) and minimal bulk (1).  The {\tt weight} property should be set
  160. to a non-zero value for heavy objects.  The {\tt bulk} property
  161. should be set to a value greater than 1 for bulky objects, and to
  162. zero for objects that are very small and take essentially no effort
  163. to hold---or, more precisely, don't detract at all from the player's
  164. ability to hold other objects (for example, a piece of paper).
  165.  
  166.  
  167. \minorsection lightsource\par
  168. {\tt lightsource:  item}.
  169. A portable lamp, candle, match, or other source of light.  The
  170. light source can be turned on and off with the {\tt islit} property.
  171. If {\tt islit} is {\tt true}, the object provides light, otherwise it's
  172. just an ordinary object.
  173.  
  174.  
  175. \minorsection hiddenItem\par
  176. {\tt hiddenItem:  object}.
  177. This is an object that is hidden with one of the {\tt hider} classes. 
  178. A {\tt hiddenItem} object doesn't have any special properties in its
  179. own right, but all objects hidden with one of the {\tt hider} classes
  180. must be of class {\tt hiddenItem} so that {\tt initSearch} can find
  181. them.
  182.  
  183.  
  184. \minorsection hider\par
  185. {\tt hider:  item}.
  186. This is a basic class of object that can hide other objects in various
  187. ways.  The {\tt underHider}, {\tt behindHider}, and {\tt searchHider} classes
  188. are examples of {\tt hider} subclasses.  The class defines
  189. the method {\tt searchObj({\it actor, list})}, which is given the list
  190. of hidden items contained in the object (for example, this would be the
  191. {\tt underCont} property, in the case of an {\tt underHider}), and ``finds''
  192. the object or objects. Its action is dependent upon a couple of other
  193. properties of the {\tt hider} object.  The {\tt serialSearch} property,
  194. if {\tt true}, indicates that items in the list are to be found one at
  195. a time; if {\tt nil} (the default), the entire list is found on the
  196. first try.  The {\tt autoTake} property, if {\tt true}, indicates that
  197. the actor automatically takes the item or items found; if {\tt nil}, the
  198. item or items are moved to the actor's location.  The {\tt searchObj} method
  199. returns the {\it list} with the found object or objects removed; the
  200. caller should assign this returned value back to the appropriate
  201. property (for example, {\tt underHider} will assign the return value
  202. to {\tt underCont}).
  203.  
  204. Note that because the {\tt hider} is hiding something, this class
  205. overrides the normal {\tt verDoSearch} method to display the
  206. message, ``You'll have to be more specific about how you want
  207. to search that.''  The reason is that the normal {\tt verDoSearch}
  208. message (``You find nothing of interest'') leads players to believe
  209. that the object was exhaustively searched, and we want to avoid
  210. misleading the player.  On the other hand, we don't want a general
  211. search to be exhaustive for most {\tt hider} objects.  So, we just
  212. display a message letting the player know that the search was not
  213. enough, but we don't give away what they have to do instead.
  214.  
  215. The objects hidden with one of the {\tt hider} classes must be
  216. of class {\tt hiddenItem}.
  217.  
  218.  
  219. \minorsection underHider\par
  220. {\tt underHider:  hider}.
  221. This is an object that can have other objects placed under it.  The
  222. objects placed under it can only be found by looking under the object;
  223. see the description of {\tt hider} for more information.   You
  224. should set the {\tt underLoc} property of each hidden object to point
  225. to the {\tt underHider}.
  226.  
  227. Note that an {\tt underHider} doesn't allow the {\it player} to put anything
  228. under the object during the game.  Instead, it's to make it easy for the
  229. game writer to set up hidden objects while implementing the game.  All you
  230. need to do to place an object under another object is declare the top
  231. object as an {\tt underHider}, then declare the hidden object normally,
  232. except use {\tt underLoc} rather than {\tt location} to specify the
  233. location of the hidden object.  The {\tt behindHider} and {\tt searchHider}
  234. objects work similarly.
  235.  
  236. The objects hidden with {\tt underHider} must be of class {\tt hiddenItem}.
  237.  
  238.  
  239. \minorsection behindHider\par
  240. {\tt behindHider:  hider}.
  241. This is just like an {\tt underHider}, except that objects are hidden
  242. behind this object.  Objects to be behind this object should have their
  243. {\tt behindLoc} property set to point to this object.
  244.  
  245. The objects hidden with {\tt behindHider} must be of class {\tt hiddenItem}.
  246.  
  247.  
  248. \minorsection searchHider\par
  249. {\tt searchHider:  hider}.
  250. This is just like an {\tt underHider}, except that objects are hidden
  251. within this object in such a way that the object must be looked in
  252. or searched.  Objects to be hidden in this object should have their
  253. {\tt searchLoc} property set to point to this object.  Note that this
  254. is different from a normal container, in that the objects hidden within
  255. this object will not show up until the object is explicitly looked in
  256. or searched.
  257.  
  258. The items hidden with {\tt searchHider} must be of class {\tt hiddenItem}.
  259.  
  260.  
  261. \minorsection fixeditem\par
  262. {\tt fixeditem:  thing}.
  263. An object that cannot be taken or otherwise moved from its location.
  264. Note that a {\tt fixeditem} is sometimes part of a movable object;
  265. this can be done to make one object part of another, ensuring that
  266. they cannot be separated.  By default, the functions that list a room's
  267. contents do not automatically describe {\tt fixeditem} objects (because
  268. the {\tt isListed} property is set to {\tt nil}).  Instead, the game author
  269. will generally describe the {\tt fixeditem} objects separately as part of
  270. the room's {\tt ldesc}.  
  271.  
  272.  
  273. \minorsection readable\par
  274. {\tt readable:  item}.
  275. An item that can be read.  The {\tt readdesc} property is displayed
  276. when the item is read.  By default, the {\tt readdesc} is the same
  277. as the {\tt ldesc}, but the {\tt readdesc} can be overridden to give
  278. a different message.
  279.  
  280.  
  281. \minorsection fooditem\par
  282. {\tt fooditem:  item}.
  283. An object that can be eaten.  When eaten, the object is removed from
  284. the game, and {\tt global.lastMealTime} is decremented by the
  285. {\tt foodvalue} property.  By default, the {\tt foodvalue} property
  286. is {\tt global.eatTime}, which is the time between meals.  So, the
  287. default {\tt fooditem} will last for one ``nourishment interval.''
  288.  
  289.  
  290. \minorsection dialItem\par
  291. {\tt dialItem:  fixeditem}.
  292. This class is used for making ``dials,'' which are controls in
  293. your game that can be turned to a range of numbers.  You must
  294. define the property {\tt maxsetting} as a number specifying the
  295. highest number to which the dial can be turned; the lowest number
  296. on the dial is always 1.  The {\tt setting} property is the dial's
  297. current setting, and can be changed by the player by typing the
  298. command ``turn dial to {\it number}.''  By default, the {\tt ldesc}
  299. method displays the current setting.
  300.  
  301.  
  302. \minorsection switchItem\par
  303. {\tt switchItem:  fixeditem}.
  304. This is a class for things that can be turned on and off by the
  305. player.  The only special property is {\tt isActive}, which is {\tt nil}
  306. if the switch is turned off and {\tt true} when turned on.  The object
  307. accepts the commands ``turn it on'' and ``turn it off,'' as well as
  308. synonymous constructions, and updates {\tt isActive} accordingly.
  309.  
  310.  
  311. \minorsection room\par
  312. {\tt room:  thing}.
  313. A location in the game.  By default, the {\tt islit} property is
  314. {\tt true}, which means that the room is lit (no light source is
  315. needed while in the room).  You should create a {\tt darkroom}
  316. object rather than a {\tt room} with {\tt islit} set to {\tt nil} if you
  317. want a dark room, because other methods are affected as well.
  318. The {\tt isseen} property records whether the player has entered
  319. the room before; initially it's {\tt nil}, and is set to {\tt true}
  320. the first time the player enters.  The {\tt roomAction({\it actor,
  321. verb, directObject, preposition, indirectObject})} method is
  322. activated for each player command; by default, all it does is
  323. call the room's location's {\tt roomAction} method if the room
  324. is inside another room.  The {\tt lookAround({\it verbosity})}
  325. method displays the room's description for a given verbosity
  326. level; {\tt true} means a full description, {\tt nil} means only
  327. the short description (just the room name plus a list of the
  328. objects present).  {\tt roomDrop({\it object})} is called when
  329. an object is dropped within the room; normally, it just moves
  330. the object to the room and displays ``Dropped.''  The {\tt firstseen}
  331. method is called when {\tt isseen} is about to be set {\tt true}
  332. for the first time (i.e., when the player first sees the room);
  333. by default, this routine does nothing, but it's a convenient
  334. place to put any special code you want to execute when a room
  335. is first entered.  The {\tt firstseen} method is called {\it after}
  336. the room's description is displayed.
  337.  
  338.  
  339. \minorsection darkroom\par
  340. {\tt darkroom:  room}.
  341. A dark room.  The player must have some object that can act as a
  342. light source in order to move about and perform most operations
  343. while in this room.  Note that the room's lights can be turned
  344. on by setting the room's {\tt lightsOn} property to {\tt true};
  345. do this instead of setting {\tt islit}, because {\tt islit} is
  346. a method which checks for the presence of a light source.
  347.  
  348.  
  349. \minorsection Actor\par
  350. {\tt Actor:  fixeditem, movableActor}.
  351. A character in the game.  The {\tt maxweight} property specifies
  352. the maximum weight that the character can carry, and the {\tt maxbulk}
  353. property specifies the maximum bulk the character can carry.  The
  354. {\tt actorAction({\it verb, directObject, preposition, indirectObject})}
  355. method specifies what happens when the actor is given a command by
  356. the player; by default, the actor ignores the command and displays
  357. a message to this effect.  The {\tt isCarrying({\it object})}
  358. method returns {\tt true} if the {\it object} is being carried by
  359. the actor.  The {\tt actorDesc} method displays a message when the
  360. actor is in the current room; this message is displayed along with
  361. a room's description when the room is entered or examined.  The
  362. {\tt verGrab({\it object})} method is called when someone tries to
  363. take an object the actor is carrying; by default, an actor won't
  364. let other characters take its possessions.
  365.  
  366. If you want the player to be able to follow the actor when it
  367. leaves the room, you should define a {\tt follower} object to shadow
  368. the character, and set the actor's {\tt myfollower} property to
  369. the {\tt follower} object.  The {\tt follower} is then automatically
  370. moved around just behind the actor by the actor's {\tt moveInto}
  371. method.
  372.  
  373. The {\tt isHim} property should return {\tt true} if the actor can
  374. be referred to by the player as ``him,'' and likewise {\tt isHer}
  375. should be set to {\tt true} if the actor can be referred to as ``her.''
  376. Note that both or neither can be set; if neither is set, the actor
  377. can only be referred to as ``it,'' and if both are set, any of ``him,''
  378. ``her,'' or ``it'' will be accepted.
  379.  
  380.  
  381. \minorsection movableActor\par
  382. {\tt movableActor:  qcontainer}.
  383. Just like an {\tt Actor} object, except that the player can
  384. manipulate the actor like an ordinary item.  Useful for certain
  385. types of actors, such as small animals.
  386.  
  387.  
  388. \minorsection follower\par
  389. {\tt follower:  Actor}.
  390. This is a special object that can ``shadow'' the movements of a
  391. character as it moves from room to room.  The purpose of a {\tt follower}
  392. is to allow the player to follow an actor as it leaves a room by
  393. typing a ``follow'' command.  Each actor that is to be followed must
  394. have its own {\tt follower} object.  The {\tt follower} object should
  395. define all of the same vocabulary words (nouns and adjectives) as the
  396. actual actor to which it refers.  The {\tt follower} must also
  397. define the {\tt myactor} property to be the {\tt Actor} object that
  398. the {\tt follower} follows.  The {\tt follower} will always stay
  399. one room behind the character it follows; no commands are effective
  400. with a {\tt follower} except for ``follow.''
  401.  
  402.  
  403. \minorsection basicMe\par
  404. {\tt basicMe:  Actor}.
  405. A default implementation of the {\tt Me} object, which is the
  406. player character.  {\tt adv.t} defines {\tt basicMe} instead of
  407. {\tt Me} to allow your game to override parts of the default
  408. implementation while still using the rest, and without changing
  409. {\tt adv.t} itself.  To use {\tt basicMe} unchanged as your player
  410. character, include this in your game:  ``{\tt Me: basicMe;}''.
  411.  
  412. The {\tt basicMe} object defines all of the methods and properties
  413. required for an actor, with appropriate values for the player
  414. character.  The nouns ``me'' and ``myself'' are defined (``I''
  415. is not defined, because it conflicts with the ``inventory''
  416. command's minimal abbreviation of ``i'' in certain circumstances,
  417. and is generally not compatible with the syntax of most player
  418. commands anyway).  The {\tt sdesc} is ``you''; the {\tt thedesc}
  419. and {\tt adesc} are ``yourself,'' which is appropriate for most
  420. contexts.  The {\tt maxbulk} and {\tt maxweight} properties are
  421. set to 10 each; a more sophisticated {\tt Me} might include the
  422. player's state of health in determining the {\tt maxweight} and
  423. {\tt maxbulk} properties.
  424.  
  425.  
  426. \minorsection decoration\par
  427. {\tt decoration:  fixeditem}.
  428. An item that doesn't have any function in the game, apart from
  429. having been mentioned in the room description.  These items
  430. are immovable and can't be manipulated in any way, but can be
  431. referred to and inspected.  Liberal use of {\tt decoration} items
  432. can improve a game's playability by helping the parser recognize
  433. all the words the game uses in its descriptions of rooms.
  434.  
  435.  
  436. \minorsection buttonitem\par
  437. {\tt buttonitem:  fixeditem}.
  438. A button (the type you push).  The individual button's action method
  439. {\tt doPush({\it actor})}, which must be specified in
  440. the button, carries out the function of the button.  Note that
  441. all buttons have the noun ``button'' defined.
  442.  
  443.  
  444. \minorsection clothingItem\par
  445. {\tt clothingItem:  item}.
  446. Something that can be worn.  By default, the only thing that
  447. happens when the item is worn is that its {\tt isworn} property
  448. is set to {\tt true}.  If you want more to happen, override the
  449. {\tt doWear({\it actor})} property.  Note that, when a {\tt clothingItem}
  450. is being worn, certain operations will cause it to be removed (for
  451. example, dropping it causes it to be removed).  If you want
  452. something else to happen, override the {\tt checkDrop} method;
  453. if you want to disallow such actions while the object is worn,
  454. use an {\tt exit} statement in the {\tt checkDrop} method.
  455.  
  456.  
  457. \minorsection obstacle\par
  458. {\tt obstacle:  object}.
  459. An {\tt obstacle} is used in place of a room for a direction
  460. property.  The {\tt destination} property specifies the room that
  461. is reached if the obstacle is successfully negotiated; when the
  462. obstacle is not successfully negotiated, {\tt destination} should
  463. display an appropriate message and return {\tt nil}.
  464.  
  465.  
  466. \minorsection doorway\par
  467. {\tt doorway:  fixeditem, obstacle}.
  468. A {\tt doorway} is an obstacle that impedes progress when it is closed.
  469. When the door is open ({\tt isopen} is {\tt true}), the user ends up in
  470. the room specified in the {\tt doordest} property upon going through
  471. the door.  Since a doorway is an obstacle, use the door object for
  472. a direction property of the room containing the door.
  473.  
  474. If {\tt noAutoOpen} is not set to {\tt true}, the door will automatically
  475. be opened when the player tries to walk through the door, unless the
  476. door is locked ({\tt islocked} = {\tt true}).  If the door is locked,
  477. it can be unlocked simply by typing ``unlock door'', unless the
  478. {\tt mykey} property is set, in which case the object specified in
  479. {\tt mykey} must be used to unlock the door.  Note that the door can
  480. only be relocked by the player under the circumstances that allow
  481. unlocking, plus the property {\tt islockable} must be set to {\tt true}.
  482. By default, the door is closed; set {\tt isopen} to {\tt true} if the door
  483. is to start out open (and be sure to open the other side as well).
  484.  
  485. {\tt otherside} specifies the corresponding doorway object in the
  486. destination room ({\tt doordest}), if any.  If {\tt otherside} is
  487. specified, its {\tt isopen} and {\tt islocked} properties will be
  488. kept in sync automatically.
  489.  
  490.  
  491. \minorsection lockableDoorway\par
  492. {\tt lockableDoorway:  doorway}.
  493. This is just a normal doorway with the {\tt islockable} and
  494. {\tt islocked} properties set to {\tt true}.  Fill in the other
  495. properties ({\tt otherside} and {\tt doordest}) as usual.  If
  496. the door has a key, set property {\tt mykey} to the key object.
  497.  
  498.  
  499. \minorsection vehicle\par
  500. {\tt vehicle:  item, nestedroom}.
  501. This is an object that an actor can board.  An actor cannot go
  502. anywhere while on board a vehicle (except where the vehicle goes);
  503. the actor must get out first.
  504.  
  505.  
  506. \minorsection surface\par
  507. {\tt surface:  item}.
  508. Objects can be placed on a surface.  Apart from using the
  509. preposition ``on'' rather than ``in'' to refer to objects
  510. contained by the object, a {\tt surface} is identical to a
  511. {\tt container}.  Note: an object cannot be both a
  512. {\tt surface} and a {\tt container}, because there is no
  513. distinction between the two internally.
  514.  
  515.  
  516. \minorsection container\par
  517. {\tt container:  item}.
  518. This object can contain other objects.  The {\tt iscontainer} property
  519. is set to {\tt true}.  The default {\tt ldesc} displays a list of the
  520. objects inside the container, if any.  The {\tt maxbulk} property
  521. specifies the maximum amount of bulk the container can contain.
  522.  
  523.  
  524. \minorsection openable\par
  525. {\tt openable:  container}.
  526. A container that can be opened and closed.  The {\tt isopenable}
  527. property is set to {\tt true}.  The default {\tt ldesc} displays
  528. the contents of the container if the container is open, otherwise
  529. a message saying that the object is closed.
  530.  
  531.  
  532. \minorsection qcontainer\par
  533. {\tt qcontainer:  container}.
  534. A ``quiet'' container:  its contents are not listed when it shows
  535. up in a room description or inventory list.  The {\tt isqcontainer}
  536. property is set to {\tt true}.
  537.  
  538.  
  539. \minorsection lockable\par
  540. {\tt lockable:  openable}.
  541. A container that can be locked and unlocked.  The {\tt islocked}
  542. property specifies whether the object can be opened or not.  The
  543. object can be locked and unlocked without the need for any other
  544. object; if you want a key to be involved, use a {\tt keyedLockable}.
  545.  
  546.  
  547. \minorsection keyedLockable\par
  548. {\tt keyedLockable:  lockable}.
  549. This subclass of {\tt lockable} allows you to create an object
  550. that can only be locked and unlocked with a corresponding key.
  551. Set the property {\tt mykey} to the {\tt keyItem} object that can
  552. lock and unlock the object.
  553.  
  554.  
  555. \minorsection keyItem\par
  556. {\tt keyItem:  item}.
  557. This is an object that can be used as a key for a {\tt keyedLockable}
  558. or {\tt lockableDoorway} object.  It otherwise behaves as an ordinary item.
  559.  
  560.  
  561. \minorsection transparentItem\par
  562. {\tt transparentItem:  item}.
  563. An object whose contents are visible, even when the object is
  564. closed.  Whether the contents are reachable is decided in the
  565. normal fashion.  This class is useful for items such as glass
  566. bottles, whose contents can be seen when the bottle is closed
  567. but cannot be reached.
  568.  
  569.  
  570. \minorsection basicNumObj\par
  571. {\tt basicNumObj:  object}.
  572. This object provides a default implementation for {\tt numObj}.
  573. To use this default unchanged in your game, include in your
  574. game this line:  ``{\tt numObj: basicNumObj}''.
  575.  
  576.  
  577. \minorsection basicStrObj\par
  578. {\tt basicStrObj:  object}.
  579. This object provides a default implementation for {\tt strObj}.
  580. To use this default unchanged in your game, include in your
  581. game this line:  ``{\tt strObj: basicStrObj}''.
  582.  
  583.  
  584. \minorsection deepverb\par
  585. {\tt deepverb:  object}.
  586. A ``verb object'' that is referenced by the parser when the player
  587. uses an associated vocabulary word.  A {\tt deepverb} contains both
  588. the vocabulary of the verb and a description of available syntax.
  589. The {\tt verb} property lists the verb vocabulary words;
  590. one word (such as {\tt 'take'}) or a pair (such as {\tt 'pick up'})
  591. can be used.  In the latter case, the second word must be a
  592. preposition, and may move to the end of the sentence in a player's
  593. command, as in ``pick it up.''  The {\tt action({\it actor})}
  594. method specifies what happens when the verb is used without any
  595. objects; its absence specifies that the verb cannot be used without
  596. an object.  The {\tt doAction} specifies the root of the message
  597. names (in single quotes) sent to the direct object when the verb
  598. is used with a direct object; its absence means that a single object
  599. is not allowed.  Likewise, the {\tt ioAction({\it preposition})}
  600. specifies the root of the message name sent to the direct and
  601. indirect objects when the verb is used with both a direct and
  602. indirect object; its absence means that this syntax is illegal.
  603. Several {\tt ioAction} properties may be present:  one for each
  604. preposition that can be used with an indirect object with the verb.
  605.  
  606. The {\tt validDo({\it actor, object, seqno})} method returns {\tt true}
  607. if the indicated object is valid as a direct object for this actor.
  608. The {\tt validIo({\it actor, object, seqno})} method does likewise
  609. for indirect objects.  The {\it seqno} parameter is a ``sequence
  610. number,'' starting with 1 for the first object tried for a given
  611. verb, 2 for the second, and so forth; this parameter is normally
  612. ignored, but can be used for some special purposes.  For example,
  613. {\tt askVerb} does not distinguish between objects matching vocabulary
  614. words, and therefore accepts only the first from a set of ambiguous
  615. objects.  These methods do not normally need to be changed; by
  616. default, they return {\tt true} if the object is accessible to the
  617. actor.
  618.  
  619. The {\tt doDefault({\it actor, prep, indirectObject})} and
  620. {\tt ioDefault({\it actor, prep})} methods return a list of the
  621. default direct and indirect objects, respectively.  These lists
  622. are used for determining which objects are meant by ``all'' and which
  623. should be used when the player command is missing an object.  These
  624. normally return a list of all objects that are applicable to the
  625. current command.
  626.  
  627.  
  628. \minorsection Prep\par
  629. {\tt Prep:  object}.
  630. A preposition.  The {\tt preposition} property specifies the
  631. vocabulary word.
  632.  
  633.  
  634.